package com.dubbo.consumer.controller;


import com.dubbo.api.entity.UserDO;
import com.dubbo.api.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


import javax.annotation.Resource;
import java.util.List;

@Controller
public class UserController {

    @Resource
    private UserService userService;

    @ResponseBody
    @RequestMapping("/getUser")
    public List<UserDO> getUser(){
        List<UserDO> userDOS = userService.listUser();
        return userDOS;
    }
}
